package src.phase.one.gui;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.ButtonGroup;
import javax.swing.ImageIcon;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.KeyStroke;

public class ActionGui extends JFrame {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	JMenuBar menuBar;
	JMenu menu, submenu;
	JMenuItem menuItem;
	JRadioButtonMenuItem rbMenuItem;
	JCheckBoxMenuItem cbMenuItem;
	
    private  GridBagLayout L = new GridBagLayout();  
    private  GridBagConstraints c = new GridBagConstraints();
    private  JTextArea Text =new JTextArea();
	
	public  ActionGui(){
		super("FlashIndex");
		setLayout(L);
		init();
		setVisible(true);
        setLocation(100, 100);
        setSize(700,300);	   
 

	}
	
	public void init(){
		
        
        setMenuBar();
        setToolBox();
        setTextArea(); 
        
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        pack();
	}
	
	public  void setMenuBar(){
		
		 c.gridx = 0;
		 c.gridy =0;
	
		 c.gridwidth = 5;			  
		 c.gridheight=1;	   
	     c.fill=GridBagConstraints.BOTH;
	     JMenuBar B=MenuBar.getMenuBar();       
	     L.setConstraints(B, c);
	     add(B);
	}
	
	public void setToolBox(){
		 c.gridx = 1;
		 c.gridy =6;
		 //5 Zellen werden auf der x Koordinate eingenommen
		 c.gridwidth = 1;	
		   //1 Zelle wird nach unten hin eingenommen
		 c.gridheight=5;
		 
	     c.fill=GridBagConstraints.BOTH;
	     c.fill=GridBagConstraints.VERTICAL;
	     ToolPanel tp=new ToolPanel();
	     JPanel p = tp.getToolPanel();
	     L.setConstraints(p, c);
	     add(p);		
	}
	
	public  void setTextArea(){
		 c.gridx = 2;
		 c.gridy =6;

		 c.gridwidth = 4;
		 c.gridheight = 10;
		
		 c.weightx=10;
		 c.weighty=40;
         
		
	     c.fill=GridBagConstraints.BOTH;
	       
	     L.setConstraints(Text, c);
	     add(Text);
	}
	

	
	

}
